<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2014/10/10
 * Time: 11:38
 * 对标附件
 */
class QuestionBenchmarkAttach extends CActiveRecord
{
    public static function model($className=__CLASS__)
    {
        return parent::model($className);
    }

    public function tableName()
    {
        return 'question_benchmark_attach';
    }
    /**
     * 得到某个题目某个网点的对标附件
     */
    public function getBySubject($nq_id, $subject_id, $network_id)
    {
        $data = $this->findAll('nq_id='.$nq_id . ' and subject_id='.$subject_id. ' and network_id='.$network_id.' and status=1');
        return $data;
    }
}